﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace Frogism.Web.Views.Money {
  public partial class MonthProgressList : System.Web.Mvc.ViewUserControl<System.Collections.ObjectModel.Collection<Frogism.Core.Balance>> {
    public int Year {
      get;
      set;
    }
    protected override void OnLoad(EventArgs e) {
      base.OnLoad(e);
      if(Year > 0)
        MonthProgressListView.DataSource = ViewData.Model.Where(b => b.BalanceDate.Year == this.Year);
      else
        MonthProgressListView.DataSource = ViewData.Model;
      MonthProgressListView.DataBind();

    }
  }
  
}
